package lab_09.task1.com.acme;

public class BankApplication {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Bank bank = new Bank();
		bank.addClient(0);
		bank.addClient(2);
		bank.addClient(5);
		
		modifyBank(bank);
		printBalance(bank);
	}
	
	protected static void modifyBank(Bank bank) {
		for (int i=0; i < bank.number; i++) {
			Client client = bank.clients[i];
			client.account.deposit(0.5); //add 0.5 to each client
			client.account.withdraw(0.25); //take 0.25 from each client's account
			
			
		}
	}
	
	protected static void printBalance(Bank bank) {
		for (int i=0; i < bank.number; i++) {
			Client client = bank.clients[i];
			System.out.format("Client number %1$d has %2$f on his account.\n", i, client.account.getBalance());
		}
	}

}
